package net.lahuobao.mall.entity.admin;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * Created by Lenovo on 2017/3/28.
 */
@Entity
@Table(name = "mall_trans_project_employee", schema = "lahuobao")
@DynamicUpdate(true)
@DynamicInsert(true)
public class MallProjectUserEntity implements Serializable {
    private Integer id;
    private Integer userid;
    private Integer projectid;
    private String realname;
    private String remark;
    private String createuserid;
    private Date createtime;
    private String updateuserid;
    private Date updatetime;
    private Boolean isdelete;
    private MallTransProjectEntity projectEntity;
    private LhbUserEntity lhbUser;


    @ManyToOne(targetEntity = LhbUserEntity.class)
    @JoinColumn(name="userid",referencedColumnName = "USER_ID")
    public LhbUserEntity getLhbUser() {
        return lhbUser;
    }

    public void setLhbUser(LhbUserEntity lhbUser) {
        this.lhbUser = lhbUser;
    }

    @ManyToOne(targetEntity = MallTransProjectEntity.class)
    @JoinColumn(name="projectid",referencedColumnName = "id")
    public MallTransProjectEntity getProjectEntity() {
        return projectEntity;
    }

    public void setProjectEntity(MallTransProjectEntity projectEntity) {
        this.projectEntity = projectEntity;
    }
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name ="ID",nullable=false,precision=10,scale=0)
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }
    @Column(name ="USERID")
    public Integer getUserid() {
        return userid;
    }

    public void setUserid(Integer userid) {
        this.userid = userid;
    }
    @Column(name ="PROJECTID")
    public Integer getProjectid() {
        return projectid;
    }

    public void setProjectid(Integer projectid) {
        this.projectid = projectid;
    }
    @Column(name ="REALNAME")
    public String getRealname() {
        return realname;
    }

    public void setRealname(String realname) {
        this.realname = realname == null ? null : realname.trim();
    }
    @Column(name ="REMARK")
    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark == null ? null : remark.trim();
    }
    @Column(name ="CREATEUSERID")
    public String getCreateuserid() {
        return createuserid;
    }

    public void setCreateuserid(String createuserid) {
        this.createuserid = createuserid == null ? null : createuserid.trim();
    }
    @Column(name ="CREATETIME")
    public Date getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }
    @Column(name ="UPDATEUSERID")
    public String getUpdateuserid() {
        return updateuserid;
    }

    public void setUpdateuserid(String updateuserid) {
        this.updateuserid = updateuserid == null ? null : updateuserid.trim();
    }
    @Column(name ="UPDATETIME")
    public Date getUpdatetime() {
        return updatetime;
    }

    public void setUpdatetime(Date updatetime) {
        this.updatetime = updatetime;
    }
    @Column(name ="ISDELETE")
    public Boolean getIsdelete() {
        return isdelete;
    }

    public void setIsdelete(Boolean isdelete) {
        this.isdelete = isdelete;
    }

}
